home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Latest Shareware Programs: Warp / OS-2 WARP - Latest Shareware Programs.iso / zipped.os2 / treiber.1 / dvi15f-1.arj / MAKEDOT.DOC < prev    next >
Text File  |  1994-09-01  |  36KB  |  1,239 lines

  1. ==============================================================================
  2. MAKEDOT.DOC (makedot 1.2d)                                VERSION: 01-Sep-1994
  3. ==============================================================================
  4.  
  5.  
  6. Table of Contents
  7. =================
  8.  
  9. 1      Introduction
  10. 2      Usage
  11. 2.1      Converting a text file into a parameter file
  12. 2.2      Converting a parameter file into a text file
  13. 2.3      Converting between different DOT file formats
  14. 2.4      Converting a text file into a binary file
  15. 2.5      Converting a binary file into a text file
  16. 3      Text file format for generating a parameter file
  17. 3.1      Keywords
  18. 3.1.1      Keywords for all parameter file types
  19. 3.1.2      Keywords for TYPE=DOT
  20. 3.1.3      Keywords for TYPE=DOT_HORZ
  21. 3.1.4      Keywords for TYPE=BITMAP
  22. 3.2      Code sequences
  23. 3.3      Examples of code sequences
  24. 4      Text file format for creating a binary file
  25. 4.1      Code sequences
  26. 5      Notes
  27. 6      Appendix: Old method for inserting parameters in a code sequence
  28. 7      History
  29.  
  30.  
  31. 1 Introduction
  32. ==============
  33.  
  34. The makedot program is used to generate parameter files for dvidot.
  35. It has two functions:
  36.  
  37. - conversion of a text file into a parameter file (DOT file)
  38.  
  39. - conversion of a parameter file (DOT file) into a text file
  40.  
  41. To modify parameter files they must first be converted into a text
  42. file which can then be changed with an editor.  The modified text file
  43. can then be converted back into a parameter file again.
  44.  
  45. makedot can also be used for creating binary files as required for the
  46. +init-files option of dvihplj and dvidot.
  47.  
  48.  
  49. 2 Usage
  50. =======
  51.  
  52.  
  53. 2.1 Converting a text file into a parameter file
  54. ------------------------------------------------
  55.  
  56. The command
  57.  
  58.     makedot -c [<options>] <input_file> [<output_file>]
  59.  
  60. converts the text file <input_file> into the DOT file <output_file>.
  61. The default extension for the output file is DOT.  If no output file
  62. name is given, the name of the input file (with the extension DOT) is
  63. used.  If you specify `-' for the input file, the text file is read
  64. from standard input.
  65.  
  66.  
  67. 2.2 Converting a parameter file into a text file
  68. ------------------------------------------------
  69.  
  70. The command
  71.  
  72.     makedot -d [<options>] <input_file> [<output_file>]
  73.  
  74. converts the DOT file <input_file> into the text file <output_file>.
  75. The default extension for the input file is DOT.  If no output file
  76. name is given then the input file name (without the extension DOT)
  77. is used.  If you specify `-' for the output file, the text file is
  78. written to standard output.
  79.  
  80.  
  81. 2.3 Converting between different DOT file formats
  82. -------------------------------------------------
  83.  
  84. dvidot 1.4n and later cannot use old DOT files.  These files must be
  85. converted by makedot.  The command
  86.  
  87.     makedot -r [<options>] <input_file> [<output_file>]
  88.  
  89. converts the DOT file <input_file> into the DOT file <output_file>.
  90. If no output file is specified, the input file will be overwritten by
  91. the converted file.
  92.  
  93. If `-o' is given, an output file compatible with older versions of
  94. makedot will be created -- unless it cannot be converted due to usage
  95. of new features.  To convert a DOT file to the old format, use
  96.  
  97.     makedot -ro <input file> [<output file>]
  98.  
  99. If `-q' is given, makedot doesn't display its logo line.
  100.  
  101.  
  102. 2.4 Converting a text file into a binary file
  103. ---------------------------------------------
  104.  
  105. The command
  106.  
  107.     makedot -b [<options>] <input_file> <output_file>
  108.  
  109. converts the text file <input_file> into the binary file
  110. <output_file>.  If you specify `-' for the input file, the text file
  111. is read from standard input.
  112.  
  113.  
  114. 2.5 Converting a binary file into a text file
  115. ---------------------------------------------
  116.  
  117. The command
  118.  
  119.     makedot -a [<options>] <input_file> <output_file>
  120.  
  121. converts the binary file <input_file> into the text file
  122. <output_file>.  If you specify `-' for the output file, the text file
  123. is written to standard output.
  124.  
  125. If `-q' is given, makedot doesn't display its logo line.
  126.  
  127.  
  128. 3 Text file format for generating a parameter file
  129. ==================================================
  130.  
  131. A text file can contain comment lines which begin with `*' or `%', all
  132. the characters after that character are ignored.  Blank lines are also
  133. ignored.
  134.  
  135. All other lines contain a keyword followed by an equals sign.
  136. Parameters for this keyword follow the equals sign.  (There are
  137. keywords which don't require parameters.)
  138.  
  139.  
  140. 3.1 Keywords
  141. ------------
  142.  
  143. All keywords given below (but those shown in square brackets) must
  144. be used, the order doesn't matter.  Optional parts of a line are
  145. enclosed in square brackets, alternatives are enclosed in parentheses
  146. and separated by a vertical bar.  The different kinds of argument are
  147. abbreviated as follows:
  148.  
  149. <d>     dimension: number and TeX unit (px may be used as well)
  150.  
  151. <e>     <expression>
  152.  
  153. <n>     number
  154.  
  155. <s>     code sequence
  156.  
  157. <t>     text
  158.  
  159. These argument types are explained below.  Depending on the setting of
  160. TYPE=, different keywords can be used.
  161.  
  162.  
  163. 3.1.1 Keywords for all parameter file types
  164. -------------------------------------------
  165.  
  166. The following keywords can be used for both types of parameter files.
  167.  
  168. [COMMENT=[<t>]]
  169.  
  170.     Comment: it is saved in the parameter file but ignored.
  171.  
  172. ENV_NAME=<t>
  173.  
  174.     Name of an environment variable, from which dvidot should take op-
  175.     tions.
  176.  
  177. FONT_PATH=<t>
  178.  
  179.     Path for font files.  This is the default setting for the
  180.     +font-files option.
  181.  
  182. LOG_NAME=<t>
  183.  
  184.     Name of the transcript file.
  185.  
  186. PAGE_HEIGHT=<d>
  187.  
  188.     Page height.  Default setting for +height.
  189.  
  190. PAGE_WIDTH=<d>
  191.  
  192.     Page width.  Default setting for +width.
  193.  
  194. RESOLUTION=<n1> <n2>
  195.  
  196.     Resolution.  <n1> is the default for +resolution-x, <n2> is the de-
  197.     fault for +resolution-y.
  198.  
  199. [TYPE=[(DOT | DOT_HORZ | BITMAP)]]
  200.  
  201.     Type of the parameter file.  With TYPE=DOT and TYPE=DOT_HORZ, a
  202.     parameter file for driving a dot-matrix printer will be created,
  203.     with TYPE=BITMAP a parameter file for creating graphics files will
  204.     be created.  If TYPE= without an argument is used or if TYPE= is
  205.     omitted, TYPE=DOT will be assumed.
  206.  
  207. [VF_PATH=<t>]
  208.  
  209.     Path for VF files.  This is the default setting for the
  210.     +virtual-fonts option and should be left empty.
  211.  
  212.  
  213. 3.1.2 Keywords for TYPE=DOT
  214. ---------------------------
  215.  
  216. TYPE=DOT is used for printers where the pins are arranged vertically
  217. and each byte of graphics data defines a column of dots.  Most dot
  218. impact printers are of this type.  The following keywords can be used
  219. only in parameter files containing TYPE=DOT.
  220.  
  221. BLANK_WIDTH=[<n>]
  222.  
  223.     Width of a space character.  Space characters are used at the left
  224.     margin to move the print head to the right.  For this reason, the
  225.     width of a space character is required in graphics mode dots.  If
  226.     spaces should not be used for this movement, then the argument
  227.     must be left empty.
  228.  
  229. COLUMNS=<n>
  230.  
  231.     Maximum number of horizontal dots in graphics mode.  This value is
  232.     an upper bound for +width.
  233.  
  234. DOUBLE_SIDED_LONG=[<s>]
  235.  
  236.     The code sequence for initializing the printer for
  237.     +double-sided:long.
  238.  
  239. DOUBLE_SIDED_SHORT=[<s>]
  240.  
  241.     The code sequence for initializing the printer for
  242.     +double-sided:short.
  243.  
  244. EXIT=[<s>]
  245.  
  246.     This sets the code sequence which is sent to the printer at the
  247.     end of the job.
  248.  
  249. FF_METHOD=(FF | LF)
  250.  
  251.     Page throw method: either a FORM_FEED sequence or multiple line
  252.     feeds (see FORM_LENGTH).
  253.  
  254. FORM_FEED=[<s>]
  255.  
  256.     The code sequence required for a page throw.  It is necessary for
  257.     FF_METHOD=FF.  The amount of feed (vertical motion units, or dots
  258.     for VMU=1) is available in the `form_feed' variable.
  259.  
  260. FORM_LENGTH=[<d>]
  261.  
  262.     Form length.  Default setting for +form-length.  Needed only for
  263.     FF_METHOD=LF.  If not given, dvidot will use the value set for the
  264.     page height as the form length.
  265.  
  266. GRAPH_END=[<s>]
  267.  
  268.     This is the code sequence which is sent to the printer immediately
  269.     after the graphics data -- normally empty.
  270.  
  271. GRAPH_MODE=[<s>]
  272.  
  273.     This sets the code sequence which selects the desired graphics
  274.     mode.  The number of dots per line is available in the `pixels'
  275.     variable.
  276.  
  277. INIT1=[<s>]
  278.  
  279.     The printer initialization sequence which is output when the
  280.     +slow:off option (which is the default) is selected.
  281.  
  282. INIT2=[<s>]
  283.  
  284.     The printer initialization sequence which is output when the
  285.     +slow:on option is selected.
  286.  
  287. LINE_FEED=[<s>]
  288.  
  289.     The code sequence which causes a line feed.  Also used with
  290.     FF_METHOD=LF.  The amount of feed (vertical motion units, or dots
  291.     for VMU=1) is available in the `line_feed' variable.  LINE_FEED
  292.     won't be used (except for throwing the page if FF_METHOD=LF is
  293.     set) if a POS_Y sequence is given.
  294.  
  295. MAX_LF=<n>
  296.  
  297.     This is the largest line feed which can be performed by a code
  298.     sequence expressed in graphics mode dots -- see LINE_FEED.
  299.     Greater line feeds are performed by using multiple smaller line
  300.     feeds.
  301.  
  302. MAX_WIDTH=[<n1> [<n2>]]
  303.  
  304.     If the page width, converted to graphics mode dots, is set to one
  305.     of these values, it is reduced by 1 (dot), so that the printer
  306.     does not execute an automatic line feed when it reaches the
  307.     right-hand margin.  This will leave a blank dot at the right
  308.     margin.
  309.  
  310. METHOD=<n1> <n2>
  311.  
  312.     Printing method.  The number <n1> is the number of bytes that must
  313.     be sent to the printer to print a column of dots in the selected
  314.     graphics mode (1 to 8).  <n2> is the number of passes per line
  315.     (separated by the smallest line spacing).  If, for instance, the
  316.     pin spacing is 1/72 inch and the printer can move the paper in
  317.     1/216 inch steps reasonably reliably, then <n2> can be set to 3.
  318.     In this way this example can attain a vertical resolution of 216
  319.     DPI.  Values from 1 to 6 can be used.
  320.  
  321. ONE_LINE_FEED=[<n>]
  322.  
  323.     This value is used by INIT1 and INIT2 to program the printer's
  324.     line spacing.  If LINE_FEED (see below) is used to reprogram the
  325.     line spacing, then the argument to ONE_LINE_FEED must be empty.
  326.     The printer must perform a line feed of <n> dots when it receives
  327.     a LF character.
  328.  
  329. PINS=<n1> <n2>
  330.  
  331.     The bit numbers of the print head pins: <n1> is the bit number
  332.     corresponding to the top pin and <n2> is the bit number
  333.     corresponding to the bottom pin (most printers are set to PINS=0 7
  334.     or PINS=7 0).  Values from 0 to 7 can be entered.
  335.  
  336. POS_X=[<s>]
  337.  
  338.     The code sequence which positions the print head horizontally.
  339.     The horizontal position required in graphics mode dots is
  340.     available in the `pos_x' variable.
  341.  
  342. POS_Y=[<s>]}
  343.  
  344.     The code sequence which positions the print head to an absolute
  345.     vertical position.  The vertical position required in graphics
  346.     mode dots is available in the `pos_y' variable.  If a POS_Y
  347.     sequence is given, LINE_FEED is not used (except for throwing the
  348.     page if FF_METHOD=LF is set).
  349.  
  350. S_OPTION=(OFF | SLOW | DOUBLE_STRIKE)
  351.  
  352.     This sets the meaning of the +slow option.  When set to OFF there
  353.     is no +slow option.  If set to SLOW, +slow:on selects INIT2 rather
  354.     than INIT1.  If set to DOUBLE_STRIKE, the +slow:on option selects
  355.     INIT2 instead of INIT1 as well as making two passes over each out-
  356.     put line.  In the first pass dots 1, 3, 5, ...  are printed and in
  357.     the second pass dots 2, 4, 6, ...  This is intended for printers
  358.     (like the FX-80) which cannot print two consecutive dots with the
  359.     same needle.
  360.  
  361. [VMU=<n>]
  362.  
  363.     Vertical motion unit.  This is the number of graphics dots per
  364.     line feed unit.  For instance, if the printer can print at 360
  365.     DPI vertically, but only can feed the paper in 1/180" units, set
  366.     VMU=2.  If VMU is not set or set to 0, VMU=1 is assumed.  VMU=1
  367.     means that vertical motion is expressed in graphics dots.
  368.  
  369.  
  370. 3.1.3 Keywords for TYPE=DOT_HORZ
  371. --------------------------------
  372.  
  373. TYPE=DOT_HORZ is used for printers where each byte of graphics data
  374. defines 8 successive horizontally arranged dots.  Some ink jet
  375. printers are of this type.  The following keywords can be used only in
  376. parameter files containing TYPE=DOT_HORZ.
  377.  
  378. BITS=<n1> <n2>
  379.  
  380.     Bit ordering within a byte of graphics data.  Bit <n1> is at
  381.     the left hand side, bit <n2> is at the right hand side.  Only
  382.     `BITS=7 0' or `BITS=0 7' can be used.
  383.  
  384. COLUMNS=<n>
  385.  
  386.     Maximum number of horizontal dots in graphics mode.  This value is
  387.     an upper bound for +width.
  388.  
  389. DOUBLE_SIDED_LONG=[<s>]
  390.  
  391.     The code sequence for initializing the printer for
  392.     +double-sided:long.
  393.  
  394. DOUBLE_SIDED_SHORT=[<s>]
  395.  
  396.     The code sequence for initializing the printer for
  397.     +double-sided:short.
  398.  
  399. EXIT=[<s>]
  400.  
  401.     This sets the code sequence which is sent to the printer at the
  402.     end of the job.
  403.  
  404. FF_METHOD=(FF | LF)
  405.  
  406.     Page throw method: either a FORM_FEED sequence or multiple line
  407.     feeds (see FORM_LENGTH).
  408.  
  409. FIRST_BYTE=(TOP | BOTTOM) (LEFT | RIGHT)
  410.  
  411.     This declaration defines which corner of the image relates to the
  412.     first byte of the first row to be printed.  TOP prints the top row
  413.     first, BOTTOM prints the bottom row first.  LEFT prints the left
  414.     column of each row first, RIGHT prints the right column of each
  415.     row first.  The following settings are used most often:
  416.  
  417.         FIRST_BYTE=TOP LEFT
  418.  
  419. FORM_FEED=[<s>]
  420.  
  421.     The code sequence required for a page throw.  It is necessary for
  422.     FF_METHOD=FF.  The amount of feed (vertical motion units, or dots
  423.     for VMU=1) is available in the `form_feed' variable.
  424.  
  425. FORM_LENGTH=[<d>]
  426.  
  427.     Form length.  Default setting for +form-length.  Needed only for
  428.     FF_METHOD=LF.  If not given, dvidot will use the value set for the
  429.     page height as the form length.
  430.  
  431. INIT1=[<s>]
  432.  
  433.     The printer initialization sequence which is output when the
  434.     +slow:off option (which is the default) is selected.
  435.  
  436. INIT2=[<s>]
  437.  
  438.     The printer initialization sequence which is output when the
  439.     +slow:on option is selected.
  440.  
  441. LINE_FEED=[<s>]
  442.  
  443.     The code sequence which causes a line feed.  Also used with
  444.     FF_METHOD=LF.  The amount of feed (vertical motion units, or dots
  445.     for VMU=1) is available in the `line_feed' variable.  LINE_FEED
  446.     won't be used (except for throwing the page if FF_METHOD=LF is
  447.     set) if a POS_Y sequence is given.
  448.  
  449. MAX_LF=<n>
  450.  
  451.     This is the largest line feed which can be performed by a code
  452.     sequence expressed in graphics mode dots -- see LINE_FEED.
  453.     Greater line feeds are performed by using multiple smaller line
  454.     feeds.
  455.  
  456. MAX_WIDTH=[<n1> [<n2>]]
  457.  
  458.     If the page width, converted to graphics mode dots, is set to one
  459.     of these values, it is reduced by 1 (dot), so that the printer
  460.     does not execute an automatic line feed when it reaches the
  461.     right-hand margin.  This will leave a blank dot at the right
  462.     margin.
  463.  
  464. ONE_LINE_FEED=[<n>]
  465.  
  466.     This value is used by INIT1 and INIT2 to program the printer's
  467.     line spacing.  If LINE_FEED (see below) is used to reprogram the
  468.     line spacing, then the argument to ONE_LINE_FEED must be empty.
  469.     The printer must perform a line feed of <n> dots when it receives
  470.     a LF character.
  471.  
  472. POS_X=[<s>]
  473.  
  474.     The code sequence which positions the print head horizontally.
  475.     The horizontal position required in graphics mode dots is
  476.     available in the `pos_x' variable.
  477.  
  478. [POS_Y=[<s>]]
  479.  
  480.     The code sequence which positions the print head to an absolute
  481.     vertical position.  The vertical position required in graphics
  482.     mode dots is available in the `pos_y' variable.  If a POS_Y
  483.     sequence is given, LINE_FEED is not used (except for throwing the
  484.     page if FF_METHOD=LF is set).
  485.  
  486. ROW_BEGIN=[<s>]
  487.  
  488.     This code sequence is written at the beginning of each row of
  489.     data.  Graphics data will follow immediately.  The width of the
  490.     row (pixels) is available in the `pixels' variable.
  491.  
  492. ROW_END=[<s>]
  493.  
  494.     This code sequence is written immediately after each row of data.
  495.     The horizontal position may or may not be changed by ROW_END.  It
  496.     is assumed that ROW_END moves the cursor to the next row.
  497.  
  498. S_OPTION=(OFF | SLOW)
  499.  
  500.     This sets the meaning of the +slow option.  When set to OFF there
  501.     is no +slow option.  If set to SLOW, +slow:on selects INIT2 rather
  502.     than INIT1.
  503.  
  504. [VMU=<n>]
  505.  
  506.     Vertical motion unit.  This is the number of graphics dots per
  507.     line feed unit.  For instance, if the printer can print at 360
  508.     DPI vertically, but only can feed the paper in 1/180" units, set
  509.     VMU=2.  If VMU is not set or set to 0, VMU=1 is assumed.  VMU=1
  510.     means that vertical motion is expressed in graphics dots.
  511.  
  512.  
  513. 3.1.4 Keywords for TYPE=BITMAP
  514. ------------------------------
  515.  
  516. The following keywords can be used only in parameter files containing
  517. TYPE=BITMAP.
  518.  
  519. ALIGN_WIDTH=<n>
  520.  
  521.     The width of the bitmap will be rounded to an integral multiple of
  522.     <n> bytes.  <n> can take the values 1, 2 and 4.
  523.  
  524. BITS=<n1> <n2>
  525.  
  526.     Bit ordering within a byte of graphics data.  Bit <n1> is at
  527.     the left hand side, bit <n2> is at the right hand side.  Only
  528.     `BITS=7 0' or `BITS=0 7' can be used.
  529.  
  530. CHECKSUM=<n1> <n2> <t> <n4> <e>
  531.  
  532.     Method for computing the value of the `checksum' variable for
  533.     insertion in the HEADER code sequence.  First, `checksum' is set
  534.     to <n4>.  Then, a loop will be performed over the HEADER sequence
  535.     starting at byte position <n1>, performing <n2> iterations:
  536.     depending on <t>, 1, 2 or 4 bytes will be fetched from the header
  537.     and assigned to the `value' variable; the expression <e> will be
  538.     evaluated and the result will be assigned to the `checksum' vari-
  539.     able; the position within the header is advanced by 1, 2 or 4,
  540.     depending on <t>.  The value of the `checksum' variable after <n2>
  541.     iterations will be the value inserted for `checksum' into the
  542.     header code sequence.  For this computation, 0 will be inserted
  543.     for the `checksum' and `file_size' variables in the header
  544.     code sequence.  If you need to include these variables in the
  545.     computation of the checksum, you can try to do so when inserting
  546.     the checksum into the header.
  547.  
  548.     You can use the following keywords for <t>:
  549.  
  550.     BYTE    8 bits
  551.  
  552.     WORD_LH
  553.             16 bits, least significant byte first
  554.  
  555.     WORD_HL
  556.             16 bits, most significant byte first
  557.  
  558.     LONG_LH
  559.             32 bits, least significant byte first
  560.  
  561.     LONG_HL
  562.             32 bits, most significant byte first
  563.  
  564.     Example:
  565.  
  566.         CHECKSUM=0 16 WORD_LH 0 (checksum^value)
  567.  
  568.     The checksum is computed as 16-bit XOR over the first 32 bytes.
  569.  
  570.     If no checksum is required, you can use
  571.  
  572.         CHECKSUM=0 0 BYTE 0 0
  573.  
  574. COMPRESS=(NO | MSP | PCX)
  575.  
  576.     Type of compression for the graphics data.  COMPRESS=NO doesn't
  577.     compress at all, the graphics data will be copied unmodified into
  578.     the output file.  COMPRESS=MSP uses a compression method as used
  579.     in MSP files, COMPRESS=PCX uses a RLE type compression method as
  580.     used in PCX files.
  581.  
  582. FIRST_BYTE=(TOP | BOTTOM) (LEFT | RIGHT)
  583.  
  584.     This declaration defines which corner of the image relates to the
  585.     first byte of the graphics data.  TOP puts the top row first,
  586.     BOTTOM puts the bottom row first.  LEFT puts the left column of
  587.     each row first, RIGHT puts the right column of each row first.
  588.     The following settings are used most often:
  589.  
  590.         FIRST_BYTE=TOP LEFT
  591.  
  592. HEADER=[<s>]
  593.  
  594.     The header of the graphics file.  This code sequence will be put
  595.     at the start of the graphics file.  You can use the variables
  596.     res_x, res_y, width, height, checksum and file_size.
  597.  
  598. ROW_BEGIN=[<s>]
  599.  
  600.     This code sequence is written at the beginning of each row of
  601.     data.  Graphics data will follow immediately.  The width of the
  602.     row (pixels) is available in the `pixels' variable.  Usually
  603.     empty.
  604.  
  605. ROW_END=[<s>]
  606.  
  607.     This code sequence is written immediately after each row of data.
  608.     Usually empty.
  609.  
  610. TRAILER=[<s>]
  611.  
  612.     This code sequence is written at the end of the graphics file.
  613.     You can use the variables res_x, res_y, width, height and
  614.     checksum.
  615.  
  616.  
  617. 3.2 Code sequences
  618. ------------------
  619.  
  620. These sequences usually consist of several commands which are
  621. separated by spaces.  Each command can be constructed from the
  622. following tokens:
  623.  
  624. ASCII control codes and other names
  625.  
  626.     These commands insert one byte:
  627.  
  628.         NUL     Code 00(hex) 0(dec).
  629.         SOH     Code 01(hex) 1(dec).
  630.         STX     Code 02(hex) 2(dec).
  631.         ETX     Code 03(hex) 3(dec).
  632.         EOT     Code 04(hex) 4(dec).
  633.         ENQ     Code 05(hex) 5(dec).
  634.         ACK     Code 06(hex) 6(dec).
  635.         BEL     Code 07(hex) 7(dec).
  636.         BS      Code 08(hex) 8(dec).
  637.         TAB     Code 09(hex) 9(dec).
  638.         HT      Code 09(hex) 9(dec).
  639.         LF      Code 0A(hex) 10(dec).
  640.         VT      Code 0B(hex) 11(dec).
  641.         FF      Code 0C(hex) 12(dec).
  642.         CR      Code 0D(hex) 13(dec).
  643.         SO      Code 0E(hex) 14(dec).
  644.         SI      Code 0F(hex) 15(dec).
  645.         DLE     Code 10(hex) 16(dec).
  646.         DC1     Code 11(hex) 17(dec).
  647.         DC2     Code 12(hex) 18(dec).
  648.         DC3     Code 13(hex) 19(dec).
  649.         DC4     Code 14(hex) 20(dec).
  650.         NAK     Code 15(hex) 21(dec).
  651.         SYN     Code 16(hex) 22(dec).
  652.         ETB     Code 17(hex) 23(dec).
  653.         CAN     Code 18(hex) 24(dec).
  654.         EM      Code 19(hex) 25(dec).
  655.         SUB     Code 1A(hex) 26(dec).
  656.         ESC     Code 1B(hex) 27(dec).
  657.         FS      Code 1C(hex) 28(dec).
  658.         GS      Code 1D(hex) 29(dec).
  659.         RS      Code 1E(hex) 30(dec).
  660.         US      Code 1F(hex) 31(dec).
  661.         DEL     Code 7F(hex) 127(dec).
  662.  
  663. ASCII printing characters
  664.  
  665.     These commands insert one or more bytes:
  666.  
  667.     'x      A single character: the character following the single
  668.             quote ' is sent as is.
  669.  
  670.     "xxx"   A string of characters: the characters following the
  671.             double quote " up to, but not including, the next " in the
  672.             same line are sent to the printer.
  673.  
  674. Numbers standing for a character's ASCII code
  675.  
  676.     These commands insert one byte:
  677.  
  678.     0###    Octal number: # is a digit from 0 to 7.
  679.  
  680.     0x##    Hexadecimal number: # is a character from the set (0-9,
  681.             A-F).
  682.  
  683.     ###     Decimal number: # is a digit from 0 to 9.  Note: a leading
  684.             zero will cause the number to be interpreted as octal (see
  685.             0###).
  686.  
  687. Control characters
  688.  
  689.     This command insert one byte:
  690.  
  691.     ^A      Control characters: ^a to ^a or ^A to ^Z stand for codes 1
  692.             to 26, ^@ stands for 0.
  693.  
  694. Repeating
  695.  
  696.     This command performs a fixed number of repetitions of the immedi-
  697.     ately following command:
  698.  
  699.     REP#    Repeat the following command # times (1 to 256).  If there
  700.             are multiple successive REP commands, only the last one
  701.             will be obeyed.
  702.  
  703. Inserting a parameter
  704.  
  705.     These commands evaluate an expression and insert the result as
  706.     byte, 16-bit word or 32-bit word:
  707.  
  708.     DEC# <expression>
  709.  
  710.         Insert the value as decimal number (in characters) with
  711.         leading zeros, filled to # (1 to 9) places.
  712.  
  713.     BYTE <expression>
  714.  
  715.         Insert the lower 8 bits of the value as byte.
  716.  
  717.     WORD_LH <expression>
  718.  
  719.         Insert the lower 16 bits of the value using two bytes.  The
  720.         least significant byte is inserted first.
  721.  
  722.     WORD_HL <expression>
  723.  
  724.         Insert the lower 16 bits of the value using two bytes.  The
  725.         most significant byte is inserted first.
  726.  
  727.     LONG_LH <expression>
  728.  
  729.         Insert the value using four bytes.  The least significant byte
  730.         is inserted first.
  731.  
  732.     LONG_HL <expression>
  733.  
  734.         Insert the value using four bytes.  The most significant byte
  735.         is inserted first.
  736.  
  737.     The value of an <expression> is computed using 32-bit arithmetic.
  738.     An expression can be built as shown here (the parentheses are
  739.     required!):
  740.  
  741.     <decimal number>
  742.  
  743.         decimal number (0 to 2147483647)
  744.  
  745.     <hexadecimal number>
  746.  
  747.         hexadecimal number (0x0 to 0xffffffff)
  748.  
  749.     <variable>
  750.  
  751.         see below
  752.  
  753.     ( <expression> )
  754.  
  755.         redundant parentheses
  756.  
  757.     - <expression>
  758.  
  759.         change sign
  760.  
  761.     ~ <expression>
  762.  
  763.         bitwise NOT
  764.  
  765.     ( <expression> + <expression> )
  766.  
  767.         addition
  768.  
  769.     ( <expression> - <expression> )
  770.  
  771.         subtraction
  772.  
  773.     ( <expression> * <expression> )
  774.  
  775.         multiplication
  776.  
  777.     ( <expression> / <expression> )
  778.  
  779.         quotient
  780.  
  781.     ( <expression> % <expression> )
  782.  
  783.         remainder
  784.  
  785.     ( <expression> & <expression> )
  786.  
  787.         bitwise AND
  788.  
  789.     ( <expression> | <expression> )
  790.  
  791.         bitwise OR
  792.  
  793.     ( <expression> ^ <expression> )
  794.  
  795.         bitwise XOR
  796.  
  797.     ( <expression> << <expression> )
  798.  
  799.         shift left (1 << 3 yields 8)
  800.  
  801.     ( <expression> >> <expression> )
  802.  
  803.         shift right (10 >> 1 yields 5)
  804.  
  805.     ( <expression> < <expression> )
  806.  
  807.         comparison: if less than, 0 otherwise
  808.  
  809.     ( <expression> = <expression> )
  810.  
  811.         comparison: 1 if equal, 0 otherwise
  812.  
  813.     Parentheses can only be omitted for successive operators of the
  814.     SAME type, the operators will be evaluated from left to right.
  815.     Parentheses cannot be omitted for `<<', `>>', `<' and `='.  For in-
  816.     stance,
  817.  
  818.         (((1+2)+3)+4)
  819.  
  820.     can be abbreviated to
  821.  
  822.         (1+2+3+4)
  823.  
  824.     On the other hand, no parentheses can be omitted in ((3*2)+1).
  825.  
  826.     A <variable> is one of the following:
  827.  
  828.     res_x
  829.  
  830.         horizontal resolution (DPI, +resolution-x)
  831.  
  832.     res_y
  833.  
  834.         vertical resolution (DPI, +resolution-y)
  835.  
  836.     width
  837.  
  838.         sheet width (pixels, +width)
  839.  
  840.     height
  841.  
  842.         sheet height (pixels, +height)
  843.  
  844.     one_lf
  845.  
  846.         the value set with ONE_LINE_FEED=
  847.  
  848.     blank
  849.  
  850.         the value set with BLANK_WIDTH=
  851.  
  852.     max_lf
  853.  
  854.         the value set with MAX_LF=
  855.  
  856.     pixels
  857.  
  858.         the width of the current row of the bitmap
  859.  
  860.     line_feed
  861.  
  862.         the amount of line feed
  863.  
  864.     form_feed
  865.  
  866.         the amount of form feed
  867.  
  868.     pos_x
  869.  
  870.         horizontal position for POS_X=
  871.  
  872.     checksum
  873.  
  874.         checksum
  875.  
  876.     value
  877.  
  878.         used for computing the checksum
  879.  
  880.     file_size
  881.  
  882.         file length (only usable with HEADER=)
  883.  
  884.     vmu
  885.  
  886.         the value set with VMU=.  If VMU= is not set or set to 0, the
  887.         vmu variable contains 1
  888.  
  889. Continuation line
  890.  
  891.     If the last character of the line is a `\' preceded by a blank,
  892.     the next line (which must not be a comment line) will be a
  893.     continuation line.  Using continuation lines, long code sequences
  894.     can be entered more conveniently.  Each <expression> must be
  895.     entered completely on in line.
  896.  
  897.  
  898. 3.3 Examples of code sequences
  899. ------------------------------
  900.  
  901. 240 DPI graphics mode for the EPSON FX-80:
  902.  
  903.     ESC '* 3 WORD_LH pixels
  904.  
  905. In hexadecimal this is: 1B 2A 03 <n1> <n2>, where <n1>+256*<n2> is the
  906. width of the graphics in dots.
  907.  
  908. Line feed for NEC P6:
  909.  
  910.     FS '3 BYTE line_feed LF
  911.  
  912. In hexadecimal this is: 1C 33 <n1> 0A.  The paper will be moved by
  913. <n1>/360 inch.
  914.  
  915. Horizontal positioning for a C.ITOH 8510A:
  916.  
  917.     ESC 'F DEC4 pos_x
  918.  
  919. In hexadecimal this is: 1B 46 <n1> <n2> <n3> <n4>, where <n1> to
  920. <n4> are numbers (30 to 39, hexadecimal) which give the horizontal
  921. position.
  922.  
  923. A 24 pin graphics mode, specify number of bytes + 1 (width * 3 + 1):
  924.  
  925.     ESC "[g" WORD_LH ((pixels*3)+1) 5
  926.  
  927. In hexadecimal this is (the parameter is assumed to be 100):
  928.  
  929.     1B 5B 67 2D 01 05
  930.              ^^^^^
  931.              301 = 3*100+1
  932.  
  933. Nonsense example:
  934.  
  935.     ^A "abc" TAB '  010 10 0x10 " ' " REP2 "ab" 0
  936.  
  937. This is: 01 61 62 63 09 20 08 0A 10 20 27 20 61 62 61 62 00.
  938.  
  939. Example for continuation lines:
  940.  
  941.     INIT1=CAN DC2 ESC '5 0 ESC 'F ESC 'H ESC 'I 0 ESC 'T ESC 'U 0 \
  942.           ESC 'X 1 255 ESC "[@" 4 0 0 0 17 1 ESC '_ 0 ESC '- 0 \
  943.           ESC "[\" 4 0 0 0 0x68 0x01 ESC '3 BYTE one_lf CR
  944.  
  945.  
  946. 4 Text file format for creating a binary file
  947. =============================================
  948.  
  949. A text file can contain comment lines which begin with `*' or `%', all
  950. the characters after that character are ignored.  Blank lines are also
  951. ignored.
  952.  
  953. All other lines contain code sequences which are written to the binary
  954. file.  The code sequences used for creating a binary file are a subset
  955. of the code sequences used for generating a parameter file.
  956.  
  957.  
  958. 4.1 Code sequences
  959. ------------------
  960.  
  961. These sequences usually consist of several commands which are
  962. separated by spaces.  Each command can be constructed from the
  963. following tokens:
  964.  
  965. ASCII control codes and other names
  966.  
  967.     These commands insert one byte:
  968.  
  969.         NUL     Code 00(hex) 0(dec).
  970.         SOH     Code 01(hex) 1(dec).
  971.         STX     Code 02(hex) 2(dec).
  972.         ETX     Code 03(hex) 3(dec).
  973.         EOT     Code 04(hex) 4(dec).
  974.         ENQ     Code 05(hex) 5(dec).
  975.         ACK     Code 06(hex) 6(dec).
  976.         BEL     Code 07(hex) 7(dec).
  977.         BS      Code 08(hex) 8(dec).
  978.         TAB     Code 09(hex) 9(dec).
  979.         HT      Code 09(hex) 9(dec).
  980.         LF      Code 0A(hex) 10(dec).
  981.         VT      Code 0B(hex) 11(dec).
  982.         FF      Code 0C(hex) 12(dec).
  983.         CR      Code 0D(hex) 13(dec).
  984.         SO      Code 0E(hex) 14(dec).
  985.         SI      Code 0F(hex) 15(dec).
  986.         DLE     Code 10(hex) 16(dec).
  987.         DC1     Code 11(hex) 17(dec).
  988.         DC2     Code 12(hex) 18(dec).
  989.         DC3     Code 13(hex) 19(dec).
  990.         DC4     Code 14(hex) 20(dec).
  991.         NAK     Code 15(hex) 21(dec).
  992.         SYN     Code 16(hex) 22(dec).
  993.         ETB     Code 17(hex) 23(dec).
  994.         CAN     Code 18(hex) 24(dec).
  995.         EM      Code 19(hex) 25(dec).
  996.         SUB     Code 1A(hex) 26(dec).
  997.         ESC     Code 1B(hex) 27(dec).
  998.         FS      Code 1C(hex) 28(dec).
  999.         GS      Code 1D(hex) 29(dec).
  1000.         RS      Code 1E(hex) 30(dec).
  1001.         US      Code 1F(hex) 31(dec).
  1002.         DEL     Code 7F(hex) 127(dec).
  1003.  
  1004. ASCII printing characters
  1005.  
  1006.     These commands insert one or more bytes:
  1007.  
  1008.     'x      A single character: the character following the single
  1009.             quote ' is sent as is.
  1010.  
  1011.     "xxx"   A string of characters: the characters following the
  1012.             double quote " up to, but not including, the next " in the
  1013.             same line are sent to the printer.
  1014.  
  1015. Numbers standing for a character's ASCII code
  1016.  
  1017.     These commands insert one byte:
  1018.  
  1019.     0###    Octal number: # is a digit from 0 to 7.
  1020.  
  1021.     0x##    Hexadecimal number: # is a character from the set (0-9,
  1022.             A-F).
  1023.  
  1024.     ###     Decimal number: # is a digit from 0 to 9.  Note: a leading
  1025.             zero will cause the number to be interpreted as octal (see
  1026.             0###).
  1027.  
  1028. Control characters
  1029.  
  1030.     This command insert one byte:
  1031.  
  1032.     ^A      Control characters: ^a to ^a or ^A to ^Z stand for codes 1
  1033.             to 26, ^@ stands for 0.
  1034.  
  1035.  
  1036. 5 Notes
  1037. =======
  1038.  
  1039. Some of the settings can also be made through command line options
  1040. of dvidot, this way is recommended.  Each printer (and printer mode)
  1041. should have its own parameter file.  Parameter file settings which can
  1042. be changed on the dvidot command line should be given values which are
  1043. reasonable but not expected to cover all cases, as the right value can
  1044. easily be put on the command line or in the configuration file.
  1045.  
  1046. Please do not change the parameter files supplied -- if you must
  1047. change them, copy them to a file with a different name first.
  1048.  
  1049. When you have developed (and thoroughly tested) a set of parameters
  1050. for a new printer or mode, please send them to the author (address in
  1051. the readme.eng file), so that others can profit from it and so that a
  1052. standard is upheld.
  1053.  
  1054. If you cannot create a parameter file for a printer using the methods
  1055. above, please get in touch with the author so that makedot and dvidot
  1056. can be extended to cover this new case.
  1057.  
  1058.  
  1059. 6 Appendix: Old method for inserting parameters in a code sequence
  1060. ==================================================================
  1061.  
  1062. If you need to read an old parameter file: here's the old method for
  1063. inserting parameters in code sequences.  When converting old DOT files
  1064. to new ones, the code sequences will be automatically converted,
  1065. therefore you don't have to read this.
  1066.  
  1067. The following commands are used for inserting a numeric parameter in a
  1068. code sequence (see below for xx):
  1069.  
  1070. xx+#
  1071.  
  1072.     Add # to parameter before inserting parameter
  1073.  
  1074. xx-#
  1075.  
  1076.     Subtract # from parameter before inserting parameter
  1077.  
  1078. xx*#+#
  1079.  
  1080.     Multiply parameter by the first number and add the second number
  1081.     before inserting parameter
  1082.  
  1083. xx*#-#
  1084.  
  1085.     Multiply parameter by the first number and add the second number
  1086.     before inserting parameter
  1087.  
  1088. You cannot use xx alone, use xx+0 instead.  Choose xx from the
  1089. following:
  1090.  
  1091. D1 to D9
  1092.  
  1093.     The parameter is inserted as a decimal number (in characters)
  1094.     with leading zeros (D1: filled to one place, D9: filled to nine
  1095.     places).
  1096.  
  1097. L
  1098.  
  1099.     The low byte of the parameter is inserted as a binary number.
  1100.  
  1101. H
  1102.  
  1103.     The high byte of the parameter is inserted as a binary number.
  1104.  
  1105. LH
  1106.  
  1107.     The parameter is inserted as a binary number in two bytes (the low
  1108.     byte first then the high byte).
  1109.  
  1110. HL
  1111.  
  1112.     The parameter is inserted as a binary number in two bytes (the
  1113.     high byte first then the low byte).
  1114.  
  1115. The parameter depends on the context:
  1116.  
  1117. INIT1   one_line_feed
  1118.  
  1119. INIT2   one_line_feed
  1120.  
  1121. GRAPH_MODE
  1122.         pixels
  1123.  
  1124. LINE_FEED
  1125.         line_feed
  1126.  
  1127. POS_X   pos_x
  1128.  
  1129.  
  1130. 7 History
  1131. =========
  1132.  
  1133. Version 1.0a (21-Feb-1990):
  1134. ---------------------------
  1135.  
  1136. First version
  1137.  
  1138.  
  1139. Version 1.1a (22-Mar-1990):
  1140. ---------------------------
  1141.  
  1142. -   New keyword: VF_PATH
  1143.  
  1144. -   METHOD=n1 n2: New range for n1 and n2: 1 to 6
  1145.  
  1146.  
  1147. Version 1.1b (22-Jun-1990):
  1148. ---------------------------
  1149.  
  1150. -   xx*#+# and xx*#-#
  1151.  
  1152.  
  1153. Version 1.1c (22-Sep-1990):
  1154. ---------------------------
  1155.  
  1156. -   Bug fixed (`makedot -d' output of LH+n and HL+n with non-zero n)
  1157.  
  1158. -   Bug fixed (`makedot -d' output of BLANK_WIDTH=<empty>)
  1159.  
  1160.  
  1161. Version 1.1d (18-Nov-1991):
  1162. ---------------------------
  1163.  
  1164. *** DOT file format changed -- old files must be converted
  1165.  
  1166. *** New syntax for inserting parameters into code sequences
  1167.  
  1168. -   The description of LINE_FEED and ONE_LINE_FEED was wrong
  1169.  
  1170. -   GRAPH_END has been ignored
  1171.  
  1172. -   Declarations need not to be given in the order listed in this
  1173.     documentation
  1174.  
  1175. -   Lines beginning with `%' are comment lines
  1176.  
  1177. -   Continuation lines.
  1178.  
  1179. -   Bug fixed: output of octal numbers was wrong (-d switch)
  1180.  
  1181. -   Bug fixed: output of control characters was wrong (-d switch)
  1182.  
  1183. -   REP###
  1184.  
  1185. -   No fixed limit for the length of code sequences
  1186.  
  1187. -   TYPE=BITMAP for creating graphics files
  1188.  
  1189. -   Command line options: -r and -o
  1190.  
  1191. -   Double-sided printing
  1192.  
  1193. -   METHOD=8 n2
  1194.  
  1195.  
  1196. Version 1.1e (19-Dec-1991):
  1197. ---------------------------
  1198.  
  1199. -   -a and -b commands
  1200.  
  1201.  
  1202. Version 1.1f (17-Oct-1993):
  1203. ---------------------------
  1204.  
  1205. -   DOUBLE_SIDED replaced with DOUBLE_SIDED_LONG and DOUBLE_SIDED_SHORT
  1206.  
  1207.  
  1208. Version 1.2a (09-Apr-1994):
  1209. ---------------------------
  1210.  
  1211. -   Support long filenames under OS/2 (HPFS)
  1212.  
  1213. -   Add VMU keyword
  1214.  
  1215. -   Documentation is now available as OS/2 online book
  1216.  
  1217.  
  1218. Version 1.2b (21-Jun-1994):
  1219. ---------------------------
  1220.  
  1221. -   Accept VMU=0
  1222.  
  1223.  
  1224. Version 1.2c (04-Aug-1994):
  1225. ---------------------------
  1226.  
  1227. -   TYPE=DOT_HORZ for printers with bits horizontally arranged
  1228.  
  1229. -   Add POS_Y keyword
  1230.  
  1231.  
  1232. Version 1.2d (01-Sep-1994):
  1233. ---------------------------
  1234.  
  1235. -   makedot 1.2c could not process old DOT files (created by makedot 1.2b or
  1236.     lower) with -d
  1237.  
  1238.                   -------- End of MAKEDOT.DOC -------------
  1239.